﻿using System;

namespace Entities
{
    [Serializable]
    public class TaiKhoan
    {
        private string hanhDong;
        private Boolean ghiNho;
        private string tenDangNhap;
        private string matKhauDangNhap;
        private bool khoaTaiKhoan;
        private string maNhanVien;
        private bool administrator;
        private string tenNhomQuyen;
        private string tenNhanVien;
        private Entities.TaiKhoan taiKhoan;
        public Entities.TaiKhoan TK
        {
            get { return this.taiKhoan; }
            set
            {
                this.taiKhoan = value;
            }
        }
        public TaiKhoan()
        { }
        public TaiKhoan(string tenDangNhap)
        { this.tenDangNhap = tenDangNhap; }
        public TaiKhoan(string tenDangNhap, string matKhauDangNhap)
        {
            this.tenDangNhap = tenDangNhap;
            this.matKhauDangNhap = matKhauDangNhap;
        }
        public TaiKhoan(string tenDangNhap, string matKhauDangNhap, bool khoaTaiKhoan, string nhanVienID, bool administrator, string tenNhomQuyen, string tenNhanVien
            ,Entities.TaiKhoan taiKhoan)
        {
            this.taiKhoan = taiKhoan;
            this.tenDangNhap = tenDangNhap;
            this.matKhauDangNhap = matKhauDangNhap;
            this.khoaTaiKhoan = khoaTaiKhoan;
            this.maNhanVien = nhanVienID;
            this.administrator = administrator;
            this.tenNhomQuyen = tenNhomQuyen;
            this.tenNhanVien = tenNhanVien;
        }
        public TaiKhoan(string tenDangNhap, string matKhauDangNhap, bool khoaTaiKhoan, string nhanVienID, bool administrator, string tenNhomQuyen)
        {
            this.tenDangNhap = tenDangNhap;
            this.matKhauDangNhap = matKhauDangNhap;
            this.khoaTaiKhoan = khoaTaiKhoan;
            this.maNhanVien = nhanVienID;
            this.administrator = administrator;
            this.tenNhomQuyen = tenNhomQuyen;
        }
        public Boolean GhiNho
        {
            get { return ghiNho; }
            set { ghiNho = value; }
        }
        public string HanhDong
        {
            get { return hanhDong; }
            set { hanhDong = value; }
        }
        public string TenDangNhap
        {
            get { return this.tenDangNhap; }
            set
            {
                this.tenDangNhap = value;
            }
        }
        public string MatKhauDangNhap
        {
            get { return this.matKhauDangNhap; }
            set
            {
                this.matKhauDangNhap = value;
            }
        }
        public bool KhoaTaiKhoan
        {
            get { return this.khoaTaiKhoan; }
            set { this.khoaTaiKhoan = value; }
        }
        public string MaNhanVien
        {
            get { return this.maNhanVien; }
            set { this.maNhanVien = value; }
        }
        public bool Administrator
        {
            get { return this.administrator; }
            set { this.administrator = value; }
        }
        public string TenNhomQuyen
        {
            get { return this.tenNhomQuyen; }
            set
            {

                this.tenNhomQuyen = value;
            }
        }
        public string TenNhanVien
        {
            get { return this.tenNhanVien; }
            set
            {
                this.tenNhanVien = value;
            }
        }

        public bool Equals(Entities.TaiKhoan obj)
        {
            if (obj.TenDangNhap != this.tenDangNhap)
                return false;
            if (obj.MatKhauDangNhap != this.matKhauDangNhap)
                return false;
            if (obj.MaNhanVien != this.maNhanVien)
                return false;
            if (obj.TenNhomQuyen != this.tenNhomQuyen)
                return false;
            if (obj.KhoaTaiKhoan != this.khoaTaiKhoan)
                return false;
            return true;
        }
    }
}
